﻿<Window x:Class="WeatherSample.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"
        xmlns:l="clr-namespace:WeatherSample"
        Title="DynamicDataDisplay Sample" WindowState="Maximized"
        Icon="{x:Static d3:D3IconHelper.DynamicDataDisplayWhiteIcon}">
    <Grid>
        <d3:ChartPlotter Name="plotter">
            <d3:MarkerChart Name="chart" Panel.ZIndex="10">
                <d3:MarkerChart.Resources>
                    <l:WeatherConverter x:Key="converter"/>
                </d3:MarkerChart.Resources>
                
                <d3:MarkerChart.MarkerGenerator>
                    <d3:TemplateMarkerGenerator2>
                        <DataTemplate>
                            <Control Template="{Binding WeatherType, Converter={StaticResource converter}}"
                                     d3:ViewportPanel.X="{Binding Day}"
                                     d3:ViewportPanel.Y="{Binding Temperature}"
                                     />
                        </DataTemplate>
                    </d3:TemplateMarkerGenerator2>
                </d3:MarkerChart.MarkerGenerator>
            </d3:MarkerChart>
        </d3:ChartPlotter>
    </Grid>
</Window>
